using System;
using System.Collections;
using Slaks.DocumentSerialization.Document;
using Slaks.DocumentSerialization.Document.Wordnet;

namespace TestDocumentSerialization
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	internal class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		private static void Main(string[] args)
		{
			/*
			Document document = Xml2Document.ReadXml(@"c:\temp\test_html_parsed.xml");

			Console.WriteLine(document.MostFrequencyInfo.TotalMostFrequentId);
			foreach (string section in document.MostFrequencyInfo.SectionType2IdMap.Keys)
			{
				Console.WriteLine(section + " " + document.MostFrequencyInfo.SectionType2IdMap[section]);
			}
			foreach (Node node in document.Nodes)
			{
				Console.WriteLine(node.Term + "  " + node.Id);
			}

			Id2DocumentFrequencyMap id2DocumentFrequencyMap =
				TermDocumentFrequencySerialization.ReadXml(@"c:\temp\term_document_frequency_info.xml");

			Console.WriteLine("Number : " + id2DocumentFrequencyMap.Count);
			foreach (TermDocumentFrequencyElement element in id2DocumentFrequencyMap.Values)
			{
				Console.WriteLine("Term Id " + element.GetTermId());
				Console.WriteLine(" " + element.GetFrequency());
				foreach (string documentName in element.GetDocumentCollection())
				{
					Console.WriteLine(" " + documentName);
				}
			}
			*/

			WordnetDocument document = Xml2WordnetDocument.ReadXml(@"C:\Lang\projects\THESIS_RELATED\doc_01_parsed.xml");

			foreach(WordnetNode node in document.Nodes)
			{
				foreach(Synonym synonym in node.SynonymList)
				{
						foreach(long id in synonym.SynonymIdList())
						{
							Console.WriteLine(id);
						}
						Console.WriteLine("----");
				}
			}
		}
	}
}